home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
10,000 Great Games
/
10,000 Great Games.iso
/
Product
/
66
/
data1.cab
/
Source_Files
/
Src
/
Fix.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2000-01-16
|
8KB
|
95 lines
#include "stdafx.h"
int cosine_table[512] =
{
256, 256, 256, 256, 256, 256, 255, 255, 255, 254, 254, 254, 253, 253, 252, 252,
251, 250, 250, 249, 248, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238,
237, 235, 234, 233, 231, 230, 229, 227, 226, 224, 223, 221, 220, 218, 216, 215,
213, 211, 209, 207, 206, 204, 202, 200, 198, 196, 194, 192, 190, 188, 185, 183,
181, 179, 177, 174, 172, 170, 167, 165, 162, 160, 157, 155, 152, 150, 147, 145,
142, 140, 137, 134, 132, 129, 126, 123, 121, 118, 115, 112, 109, 107, 104, 101,
98, 95, 92, 89, 86, 83, 80, 77, 74, 71, 68, 65, 62, 59, 56, 53,
50, 47, 44, 41, 38, 34, 31, 28, 25, 22, 19, 16, 13, 9, 6, 3,
0, -3, -6, -9, -13, -16, -19, -22, -25, -28, -31, -34, -38, -41, -44, -47,
-50, -53, -56, -59, -62, -65, -68, -71, -74, -77, -80, -83, -86, -89, -92, -95,
-98, -101, -104, -107, -109, -112, -115, -118, -121, -123, -126, -129, -132, -134, -137, -140,
-142, -145, -147, -150, -152, -155, -157, -160, -162, -165, -167, -170, -172, -174, -177, -179,
-181, -183, -185, -188, -190, -192, -194, -196, -198, -200, -202, -204, -206, -207, -209, -211,
-213, -215, -216, -218, -220, -221, -223, -224, -226, -227, -229, -230, -231, -233, -234, -235,
-237, -238, -239, -240, -241, -242, -243, -244, -245, -246, -247, -248, -248, -249, -250, -250,
-251, -252, -252, -253, -253, -254, -254, -254, -255, -255, -255, -256, -256, -256, -256, -256,
-256, -256, -256, -256, -256, -256, -255, -255, -255, -254, -254, -254, -253, -253, -252, -252,
-251, -250, -250, -249, -248, -248, -247, -246, -245, -244, -243, -242, -241, -240, -239, -238,
-237, -235, -234, -233, -231, -230, -229, -227, -226, -224, -223, -221, -220, -218, -216, -215,
-213, -211, -209, -207, -206, -204, -202, -200, -198, -196, -194, -192, -190, -188, -185, -183,
-181, -179, -177, -174, -172, -170, -167, -165, -162, -160, -157, -155, -152, -150, -147, -145,
-142, -140, -137, -134, -132, -129, -126, -123, -121, -118, -115, -112, -109, -107, -104, -101,
-98, -95, -92, -89, -86, -83, -80, -77, -74, -71, -68, -65, -62, -59, -56, -53,
-50, -47, -44, -41, -38, -34, -31, -28, -25, -22, -19, -16, -13, -9, -6, -3,
0, 3, 6, 9, 13, 16, 19, 22, 25, 28, 31, 34, 38, 41, 44, 47,
50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95,
98, 101, 104, 107, 109, 112, 115, 118, 121, 123, 126, 129, 132, 134, 137, 140,
142, 145, 147, 150, 152, 155, 157, 160, 162, 165, 167, 170, 172, 174, 177, 179,
181, 183, 185, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 207, 209, 211,
213, 215, 216, 218, 220, 221, 223, 224, 226, 227, 229, 230, 231, 233, 234, 235,
237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 248, 249, 250, 250,
251, 252, 252, 253, 253, 254, 254, 254, 255, 255, 255, 256, 256, 256, 256, 256
};
int arccosine_table[513] =
{
32768, 31845, 31463, 31169, 30921, 30703, 30505, 30323, 30153, 29994, 29843, 29699, 29561, 29429, 29302, 29179,
29060, 28945, 28833, 28724, 28617, 28513, 28412, 28312, 28215, 28120, 28026, 27934, 27844, 27755, 27667, 27581,
27496, 27413, 27330, 27249, 27169, 27090, 27012, 26934, 26858, 26783, 26708, 26634, 26561, 26489, 26417, 26346,
26276, 26206, 26137, 26069, 26001, 25934, 25868, 25802, 25736, 25671, 25607, 25542, 25479, 25416, 25353, 25291,
25229, 25168, 25107, 25046, 24986, 24926, 24867, 24807, 24749, 24690, 24632, 24574, 24517, 24460, 24403, 24346,
24290, 24234, 24179, 24123, 24068, 24013, 23958, 23904, 23850, 23796, 23742, 23689, 23636, 23583, 23530, 23478,
23425, 23373, 23321, 23270, 23218, 23167, 23116, 23065, 23014, 22964, 22913, 22863, 22813, 22763, 22714, 22664,
22615, 22565, 22516, 22468, 22419, 22370, 22322, 22273, 22225, 22177, 22129, 22082, 22034, 21987, 21939, 21892,
21845, 21798, 21751, 21704, 21658, 21611, 21565, 21518, 21472, 21426, 21380, 21334, 21289, 21243, 21197, 21152,
21107, 21061, 21016, 20971, 20926, 20881, 20836, 20792, 20747, 20702, 20658, 20614, 20569, 20525, 20481, 20437,
20393, 20349, 20305, 20261, 20218, 20174, 20131, 20087, 20044, 20000, 19957, 19914, 19871, 19827, 19784, 19741,
19699, 19656, 19613, 19570, 19527, 19485, 19442, 19400, 19357, 19315, 19272, 19230, 19188, 19145, 19103, 19061,
19019, 18977, 18935, 18893, 18851, 18809, 18767, 18726, 18684, 18642, 18600, 18559, 18517, 18475, 18434, 18392,
18351, 18309, 18268, 18227, 18185, 18144, 18103, 18061, 18020, 17979, 17938, 17896, 17855, 17814, 17773, 17732,
17691, 17650, 17609, 17568, 17527, 17486, 17445, 17404, 17363, 17322, 17281, 17240, 17199, 17158, 17117, 17077,
17036, 16995, 16954, 16913, 16873, 16832, 16791, 16750, 16710, 16669, 16628, 16587, 16546, 16506, 16465, 16424,
16384, 16343, 16302, 16261, 16221, 16180, 16139, 16098, 16057, 16017, 15976, 15935, 15894, 15854, 15813, 15772,
15731, 15690, 15650, 15609, 15568, 15527, 15486, 15445, 15404, 15363, 15322, 15281, 15240, 15199, 15158, 15117,
15076, 15035, 14994, 14953, 14912, 14871, 14829, 14788, 14747, 14706, 14664, 14623, 14582, 14540, 14499, 14458,
14416, 14375, 14333, 14292, 14250, 14208, 14167, 14125, 14083, 14041, 14000, 13958, 13916, 13874, 13832, 13790,
13748, 13706, 13664, 13622, 13579, 13537, 13495, 13452, 13410, 13367, 13325, 13282, 13240, 13197, 13154, 13111,
13068, 13026, 12983, 12940, 12896, 12853, 12810, 12767, 12723, 12680, 12636, 12593, 12549, 12506, 12462, 12418,
12374, 12330, 12286, 12242, 12198, 12153, 12109, 12065, 12020, 11975, 11931, 11886, 11841, 11796, 11751, 11706,
11660, 11615, 11570, 11524, 11478, 11433, 11387, 11341, 11295, 11249, 11202, 11156, 11109, 11063, 11016, 10969,
10922, 10875, 10828, 10780, 10733, 10685, 10638, 10590, 10542, 10494, 10445, 10397, 10348, 10299, 10251, 10202,
10152, 10103, 10053, 10004, 9954, 9904, 9854, 9803, 9753, 9702, 9651, 9600, 9549, 9497, 9446, 9394,
9342, 9289, 9237, 9184, 9131, 9078, 9025, 8971, 8917, 8863, 8809, 8754, 8699, 8644, 8588, 8533,
8477, 8421, 8364, 8307, 8250, 8193, 8135, 8077, 8018, 7960, 7900, 7841, 7781, 7721, 7660, 7599,
7538, 7476, 7414, 7351, 7288, 7225, 7160, 7096, 7031, 6965, 6899, 6833, 6766, 6698, 6630, 6561,
6491, 6421, 6350, 6278, 6206, 6133, 6059, 5984, 5909, 5833, 5755, 5677, 5598, 5518, 5437, 5354,
5271, 5186, 5100, 5012, 4923, 4833, 4741, 4647, 4552, 4455, 4355, 4254, 4150, 4043, 3934, 3822,
3707, 3588, 3465, 3338, 3206, 3068, 2924, 2773, 2614, 2444, 2262, 2064, 1846, 1598, 1304, 922,
0
};
int tangent_table[256] =
{
0, 3, 6, 9, 13, 16, 19, 22, 25, 28, 32, 35, 38, 41, 44, 48,
51, 54, 57, 61, 64, 67, 71, 74, 78, 81, 85, 88, 92, 95, 99, 102,
106, 110, 113, 117, 121, 125, 129, 133, 137, 141, 145, 149, 153, 158, 162, 167,
171, 176, 180, 185, 190, 195, 200, 205, 210, 215, 221, 226, 232, 238, 244, 250,
256, 262, 269, 276, 282, 290, 297, 304, 312, 320, 328, 336, 345, 354, 363, 373,
383, 394, 404, 415, 427, 439, 452, 465, 479, 493, 509, 525, 541, 559, 578, 597,
618, 640, 664, 689, 715, 744, 775, 808, 844, 883, 925, 971, 1022, 1078, 1140, 1209,
1287, 1375, 1475, 1591, 1726, 1885, 2076, 2308, 2599, 2973, 3471, 4167, 5211, 6950, 10428, 20860,
-8388608, -20860, -10428, -6950, -5211, -4167, -3471, -2973, -2599, -2308, -2076, -1885, -1726, -1591, -1475, -1375,
-1287, -1209, -1140, -1078, -1022, -971, -925, -883, -844, -808, -775, -744, -715, -689, -664, -640,
-618, -597, -578, -559, -541, -525, -509, -493, -479, -465, -452, -439, -427, -415, -404, -394,
-383, -373, -363, -354, -345, -336, -328, -320, -312, -304, -297, -290, -282, -276, -269, -262,
-256, -250, -244, -238, -232, -226, -221, -215, -210, -205, -200, -195, -190, -185, -180, -176,
-171, -167, -162, -158, -153, -149, -145, -141, -137, -133, -129, -125, -121, -117, -113, -110,
-106, -102, -99, -95, -92, -88, -85, -81, -78, -74, -71, -67, -64, -61, -57, -54,
-51, -48, -44, -41, -38, -35, -32, -28, -25, -22, -19, -16, -13, -9, -6, -3
};